﻿using Md.Api.Entity.DapperModels.MdDB;
using Md.Api.Model.Manage.SysPost.Request;
using Md.Dapper.Repositories.Md;

namespace Md.Api.Service.Manage.SysPost;
/// <summary>
/// 获取系统岗位列表服务
/// </summary>
public class GetSysPostListService : ApiBase<RequestGetSysPostListModel>
{
    /// <summary>
    /// 系统岗位仓储
    /// </summary>
    public SysPostRep sysPostRep { get; set; }
    /// <summary>
    /// 执行
    /// </summary>
    protected override void ExecuteMethod()
    {
        var model = new SysPostModel();

        model.PostCode = Parameter.PostCode;
        model.PostName = Parameter.PostName;
        model.Status = Parameter.Status;
        model.CreateBy = Parameter.CreateBy;
        model.UpdateBy = Parameter.UpdateBy;

        var res = sysPostRep.GetSysPostList(model, Parameter.OrderBy, Parameter.IsDesc);

        Result.Data = res;
    }
}

